<html>
<head><meta charset="utf-8"><title>sprint day 1 chat · t-compiler/shrinkmem-sprint · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/index.html">t-compiler/shrinkmem-sprint</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html">sprint day 1 chat</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="228224427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228224427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228224427">(Mar 01 2021 at 12:52)</a>:</h4>
<p>Hi everyone in <span class="user-group-mention" data-user-group-id="897">@T-compiler/meeting</span> ! Its the first day of the sprint. I really wish I had started this topic at midnight last night. :)</p>



<a name="228224510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228224510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228224510">(Mar 01 2021 at 12:53)</a>:</h4>
<p>/me totally forgot the sprint was this week and thought it was next week.</p>



<a name="228224542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228224542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228224542">(Mar 01 2021 at 12:53)</a>:</h4>
<p>/me furiously tries to clear schedule in a last minute ditch effort.</p>



<a name="228224564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228224564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228224564">(Mar 01 2021 at 12:53)</a>:</h4>
<p>One of my hopes for the sprint is to encourage some extra socialization in a semi-casual manner. Its something we haven't really been able to do so well: Its one of the few weaknesses I'll admit of Zulip over Discord. (and of course it also doesn't help that we cannot meet in person right now.)</p>



<a name="228224835"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228224835" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228224835">(Mar 01 2021 at 12:55)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> shall we do a standup style progress check every day in the following style:</p>
<ul>
<li>Yesterday: I accomplished ???</li>
<li>Today: I will try to accomplish ???</li>
<li>Help: I'd like help in ???</li>
</ul>



<a name="228224958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228224958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228224958">(Mar 01 2021 at 12:56)</a>:</h4>
<p>Yeah that's exactly the sort of thing I'd like to see. I'm not sure if its best off in this topic or in a different one. I guess having it here is good for now.</p>



<a name="228224986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228224986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228224986">(Mar 01 2021 at 12:56)</a>:</h4>
<p>Maybe a dedicated "standup" topic?</p>



<a name="228224998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228224998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228224998">(Mar 01 2021 at 12:56)</a>:</h4>
<p>That is another option I was considering.</p>



<a name="228225022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228225022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228225022">(Mar 01 2021 at 12:57)</a>:</h4>
<p>or checkins</p>



<a name="228225367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228225367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228225367">(Mar 01 2021 at 12:59)</a>:</h4>
<p>in parallel, I've created the <a class="stream-topic" data-stream-id="131828" href="/#narrow/stream/131828-t-compiler/topic/shrinkmem.20sprint.20highlights">#t-compiler &gt; shrinkmem sprint highlights</a> topic. My hope is to post the most important bits of info there, so that people who are just watching from the sidelines in an infrequent manner can still see what's up.</p>



<a name="228227221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228227221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228227221">(Mar 01 2021 at 13:12)</a>:</h4>
<p>By the way, in our "investigations" so far, <span class="user-mention" data-user-id="125250">@Wesley Wiser</span> and I have discovered the not so surprising fact that LLVM dominates memory consumption (at least when compiling small crates like regex)</p>



<a name="228227402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228227402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228227402">(Mar 01 2021 at 13:14)</a>:</h4>
<p>yep, that's true</p>



<a name="228227428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228227428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228227428">(Mar 01 2021 at 13:14)</a>:</h4>
<p>I'd like to know if we can correlate the size of the codegen units we make with LLVM's memory usage</p>



<a name="228227453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228227453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228227453">(Mar 01 2021 at 13:15)</a>:</h4>
<p>When using cg_clif, the memory consumption of Cranelift should be tiny given that only a single function is compiled at a time and once that function is done, only the compiled bytes and relocation info is stored until the object file corresponding to the codegen unit is written.</p>



<a name="228227454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228227454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228227454">(Mar 01 2021 at 13:15)</a>:</h4>
<p>(I.e. if there's a predictable multiplicative factor there.)</p>



<a name="228227543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228227543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228227543">(Mar 01 2021 at 13:15)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116083">pnkfelix</span> <a href="#narrow/stream/276895-t-compiler.2Fshrinkmem-sprint/topic/sprint.20day.201.20chat/near/228227428">said</a>:</p>
<blockquote>
<p>I'd like to know if we can correlate the size of the codegen units we make with LLVM's memory usage</p>
</blockquote>
<p>This would be pretty easy to do (as far as I can tell) on Windows by adding ETW annotations when creating codegen units. But obviously we don't want to come up with a solution that is Windows only.</p>



<a name="228227560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228227560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228227560">(Mar 01 2021 at 13:16)</a>:</h4>
<p><span class="user-mention" data-user-id="133247">@bjorn3</span> How is cg_clif doing with respect to other aspects of performance?</p>



<a name="228227651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228227651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228227651">(Mar 01 2021 at 13:16)</a>:</h4>
<p><span class="user-mention" data-user-id="224872">@rylev</span> do you or <span class="user-mention" data-user-id="125250">@Wesley Wiser</span> know if there is some equivalent to <code>getrusage</code> you can call from within a Windows process?</p>



<a name="228227680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228227680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228227680">(Mar 01 2021 at 13:16)</a>:</h4>
<p>In particular, I'd like to know if we could generalize my PR <a href="https://github.com/rust-lang/rust/issues/82532">#82532</a> to work on Windows as well as Linux.</p>



<a name="228227740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228227740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228227740">(Mar 01 2021 at 13:17)</a>:</h4>
<p>(in terms of making the process report the max-rss among its child processes.)</p>



<a name="228227875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228227875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228227875">(Mar 01 2021 at 13:18)</a>:</h4>
<p>The new Cranelift backend regressed performance of when value debuginfo is used. (I should probably disable it for now as no DWARF value debuginfo is emitted anyway) But otherwise ~30% perf improvement. That is with only a single thread doing compilation for cg_clif and a normal amount for cg_llvm.</p>



<a name="228228018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228228018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228228018">(Mar 01 2021 at 13:19)</a>:</h4>
<p>I assume that's ~30% perf improvement in terms of compile-times. What is codegen quality at that point, compared to say llvm --opt-level=0 ?</p>



<a name="228228026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228228026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228228026">(Mar 01 2021 at 13:19)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116083">pnkfelix</span> <a href="#narrow/stream/276895-t-compiler.2Fshrinkmem-sprint/topic/sprint.20day.201.20chat/near/228227651">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="224872">rylev</span> do you or <span class="user-mention silent" data-user-id="125250">Wesley Wiser</span> know if there is some equivalent to <code>getrusage</code> you can call from within a Windows process?</p>
</blockquote>
<p>I don't believe there is an exact equivalent (though I'm not a win32 expert), but we should be able to find the same info. For example <a href="https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getprocesstimes">GetProcessTimes</a> offers some of the same info albeit without maxrss info</p>



<a name="228228127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228228127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228228127">(Mar 01 2021 at 13:20)</a>:</h4>
<p>Codegen quality is roughly on par with cg_llvm + <code>-Copt-level=0</code>.</p>



<a name="228228199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228228199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228228199">(Mar 01 2021 at 13:20)</a>:</h4>
<p>I think <code>GetProcessMemoryInfo</code> can help with maxrss</p>



<a name="228228330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228228330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228228330">(Mar 01 2021 at 13:21)</a>:</h4>
<p><span class="user-mention" data-user-id="125250">@Wesley Wiser</span> should we coordinate on seeing if we can get <a href="https://github.com/rust-lang/rust/issues/82532">https://github.com/rust-lang/rust/issues/82532</a> working on Windows?</p>



<a name="228228401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228228401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228228401">(Mar 01 2021 at 13:22)</a>:</h4>
<p>Cool; I'd just want to double-check whether <code>GetProcessMemoryInfo</code> handles only oneself, or if it will handle child proceses that have terminated (and your process waited for, analogous to Linux).</p>



<a name="228230028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228230028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228230028">(Mar 01 2021 at 13:34)</a>:</h4>
<p>So <code>GetProcessMemoryInfo</code> doesn't enumerate children like <code>getrusage</code> with <code>RUSAGE_CHILDREN</code>does. Perhaps we can enumerate the child processes ourselves and get that info, but I've been looking at other people's translation of <code>getrusage</code> for Windows and most don't support <code>RUSAGE_CHILDREN</code> which is not a good sign.</p>



<a name="228230279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228230279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228230279">(Mar 01 2021 at 13:36)</a>:</h4>
<p>I added some ideas to the brainstorm hackmd about perf and mem tests that can be done on mir optimizations</p>



<a name="228237130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228237130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228237130">(Mar 01 2021 at 14:19)</a>:</h4>
<p><span class="user-mention silent" data-user-id="224872">rylev</span> <a href="#narrow/stream/276895-t-compiler.2Fshrinkmem-sprint/topic/sprint.20day.201.20chat/near/228230028">said</a>:</p>
<blockquote>
<p>So <code>GetProcessMemoryInfo</code> doesn't enumerate children like <code>getrusage</code> with <code>RUSAGE_CHILDREN</code>does. Perhaps we can enumerate the child processes ourselves and get that info, but I've been looking at other people's translation of <code>getrusage</code> for Windows and most don't support <code>RUSAGE_CHILDREN</code> which is not a good sign.</p>
</blockquote>
<p>Part of the goal is to get the peak memory usage over the entirety of each processes' lifetime, so that's why its part of the interface that you get the info for RUSAGE_CHILDREN only on terminated processes (and its accumulated via the <code>wait</code>). Still, I agree that we might be able to hack something in ourselves; e.g., feed the peak memory value back up ourselves manually as info passed to the parent process. (But then again, maybe we would be just well off focusing on reporting RUSAGE_SELF in some consistent way across the platforms.)</p>



<a name="228246606"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228246606" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228246606">(Mar 01 2021 at 15:11)</a>:</h4>
<p>Should we be profiling with incremental compilation enabled or without? I guess more generally, what is the "scenario" we want to optimize for?</p>



<a name="228247002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228247002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228247002">(Mar 01 2021 at 15:13)</a>:</h4>
<p>personally the scenario I care about most is <code>incr-full</code>, since I have incremental turned on for rust-lang/rust</p>



<a name="228247698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228247698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228247698">(Mar 01 2021 at 15:17)</a>:</h4>
<p>though it's a bit worrisome that you care about that scenario, as it sort of implies you care about "incremental, but on a clean build" which is odd :)</p>



<a name="228247711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228247711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228247711">(Mar 01 2021 at 15:17)</a>:</h4>
<p>but we might not have anything better.</p>



<a name="228248928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228248928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228248928">(Mar 01 2021 at 15:24)</a>:</h4>
<p>I use it a lot when rebasing, which means libstd has been modified and the whole compiler needs to be rebuilt</p>



<a name="228249021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228249021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228249021">(Mar 01 2021 at 15:25)</a>:</h4>
<p>Also I use incremental a ton for patched builds, but it works well there :) so I don't think we need to focus on improving that</p>



<a name="228249283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228249283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228249283">(Mar 01 2021 at 15:26)</a>:</h4>
<p>I guess this isn't terribly surprising but a clean incremental compilation has a significantly higher peak memory use on my machine than a clean non-incremental compilation. </p>
<table>
<thead>
<tr>
<th>Command</th>
<th>Peak Memory Usage (mb)</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>build</code></td>
<td>3,161</td>
</tr>
<tr>
<td><code>build -i</code></td>
<td>4,213</td>
</tr>
</tbody>
</table>



<a name="228249571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228249571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228249571">(Mar 01 2021 at 15:28)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125250">Wesley Wiser</span> <a href="#narrow/stream/276895-t-compiler.2Fshrinkmem-sprint/topic/sprint.20day.201.20chat/near/228249283">said</a>:</p>
<blockquote>
<p>I guess this isn't terribly surprising but a clean incremental compilation has a significantly higher peak memory use on my machine than a clean non-incremental compilation. </p>
<table>
<thead>
<tr>
<th>Command</th>
<th>Peak Memory Usage (mb)</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>build</code></td>
<td>3,161</td>
</tr>
<tr>
<td><code>build -i</code></td>
<td>4,213</td>
</tr>
</tbody>
</table>
</blockquote>
<p>to me that is surprising because it means incremental uses significantly more memory than LLVM</p>



<a name="228249578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228249578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228249578">(Mar 01 2021 at 15:28)</a>:</h4>
<p>which seems ... concerning</p>



<a name="228249675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228249675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228249675">(Mar 01 2021 at 15:29)</a>:</h4>
<blockquote>
<p>incremental uses significantly more memory than LLVM</p>
</blockquote>
<p>Wouldn't that mean peak would be 2x higher?</p>



<a name="228249710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228249710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228249710">(Mar 01 2021 at 15:29)</a>:</h4>
<p>Incremental uses a lot but I don't think it's more than LLVM.</p>



<a name="228249727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228249727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228249727">(Mar 01 2021 at 15:29)</a>:</h4>
<p>I don't follow? <code>-i</code> doesn't affect memory usage for LLVM, only for incremental</p>



<a name="228249759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228249759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228249759">(Mar 01 2021 at 15:29)</a>:</h4>
<p>Right but it's only 25% more memory</p>



<a name="228249806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228249806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228249806">(Mar 01 2021 at 15:29)</a>:</h4>
<p>If incremental used more than LLVM, wouldn't we see memory usage spike by at least 2x?</p>



<a name="228249848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228249848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228249848">(Mar 01 2021 at 15:30)</a>:</h4>
<p>maybe my assumptions are wrong - is the incremental graph held in memory at the same time LLVM is running?</p>



<a name="228249934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228249934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228249934">(Mar 01 2021 at 15:30)</a>:</h4>
<p>I think it has to be</p>



<a name="228250005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228250005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228250005">(Mar 01 2021 at 15:30)</a>:</h4>
<p>ok right because CGUs are cached</p>



<a name="228250010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228250010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228250010">(Mar 01 2021 at 15:30)</a>:</h4>
<p>At least part of it, sure</p>



<a name="228250013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228250013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228250013">(Mar 01 2021 at 15:30)</a>:</h4>
<p>ignore me then</p>



<a name="228250035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228250035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228250035">(Mar 01 2021 at 15:31)</a>:</h4>
<p>Well at least until all the CGUs are ready to be optimized</p>



<a name="228289236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228289236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tyson Nottingham <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228289236">(Mar 01 2021 at 19:14)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/276895-t-compiler.2Fshrinkmem-sprint/topic/sprint.20day.201.20chat/near/228249727">said</a>:</p>
<blockquote>
<p>I don't follow? <code>-i</code> doesn't affect memory usage for LLVM, only for incremental</p>
</blockquote>
<p>You might have meant something else, but it does affect it in that it changes the number of codegen units. That means smaller units in memory simultaneously during codegen and pre-LTO optimization, but more serialized units in memory during thin local LTO.</p>



<a name="228289875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228289875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228289875">(Mar 01 2021 at 19:18)</a>:</h4>
<p>oh good point <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span> I was wrong in many ways then</p>



<a name="228291768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228291768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tyson Nottingham <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228291768">(Mar 01 2021 at 19:30)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116083">pnkfelix</span> <a href="#narrow/stream/276895-t-compiler.2Fshrinkmem-sprint/topic/sprint.20day.201.20chat/near/228227428">said</a>:</p>
<blockquote>
<p>I'd like to know if we can correlate the size of the codegen units we make with LLVM's memory usage</p>
</blockquote>
<p>By the way, I have a PR out for adding time-passes events for each CGU codegen -- <a href="https://github.com/rust-lang/rust/issues/81538">#81538</a>. The output includes CGU size estimates (number of MIR statements IIRC):</p>
<div class="codehilite"><pre><span></span><code>        time:   2.682; rss: 1926MB -&gt; 2060MB ( +134MB)  codegen_module(3k1mmmip9jmhdnm3, 740742)
        time:   3.829; rss: 2061MB -&gt; 2176MB ( +115MB)  codegen_module(35g2r0huhfuoe5v3, 715671)
        time:   4.005; rss: 2279MB -&gt; 2335MB (  +57MB)  codegen_module(3shjsbojvk8p48io, 513640)
</code></pre></div>



<a name="228292412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228292412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tyson Nottingham <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228292412">(Mar 01 2021 at 19:34)</a>:</h4>
<p>(Though you have to be careful of the RSS readings during codegen, because things are happening in parallel unless you control for it with <code>-j1</code> or <code>-Z no-parallel-llvm</code>.)</p>



<a name="228298846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228298846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tm <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228298846">(Mar 01 2021 at 20:18)</a>:</h4>
<p>There is <a href="https://github.com/rust-lang/rust/issues/65281">#65281</a> (unmerged) which included inlined items in CGU size estimates before merging them. This reduced the size dispersion of CGUs quite a bit (using no-opt.bc file sizes as true value) when I was testing it.</p>



<a name="228299469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228299469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228299469">(Mar 01 2021 at 20:22)</a>:</h4>
<p>there Is discussion at the tail end of <a href="https://github.com/rust-lang/rust/issues/65281">#65281</a> that maybe we should retry landing it. That may be a relatively simple task for someone to look into.</p>



<a name="228299571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228299571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228299571">(Mar 01 2021 at 20:22)</a>:</h4>
<p>As an aside, It is sort of a sad observation about how much the current perf results “build on luck”, as adnjo403 put it...</p>



<a name="228299710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228299710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228299710">(Mar 01 2021 at 20:23)</a>:</h4>
<p>Or maybe there are strictly smaller ways we could improve the estimation outlined in <a href="https://github.com/rust-lang/rust/issues/69382">#69382</a> ...</p>



<a name="228299796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228299796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228299796">(Mar 01 2021 at 20:24)</a>:</h4>
<p>Should we try to define a smarter partition based on the full MIR control-flow graph?</p>



<a name="228300103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228300103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228300103">(Mar 01 2021 at 20:26)</a>:</h4>
<p>The query system can be extended to recover on cycles. With that modification, the full crate CFG can be computed efficiently using queries. Is this a relevant information to build codegen units?</p>



<a name="228300107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228300107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228300107">(Mar 01 2021 at 20:26)</a>:</h4>
<p>I was thinking more something smaller. E.g. trying to estimate the cost of drop terminators. The last comment on <a href="https://github.com/rust-lang/rust/issues/69382">#69382</a> says that a drop shim receives cost estimate of zero today...</p>



<a name="228300601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%201%20chat/near/228300601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tm <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.201.20chat.html#228300601">(Mar 01 2021 at 20:29)</a>:</h4>
<p>I looked into improving the estimate itself, but without inclusion of inlined items into estimate, in terms of CGU size balance, the results were rather inconclusive, so I would suggest doing something like <a href="https://github.com/rust-lang/rust/issues/65281">#65281</a> first. Though, size estimates are also used for scheduling (and at that point they do include inlined items) so maybe it would be worth it from that perspective.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>